{% if data %}
    {% for company, summary in data.items() %}
    <h6 style="margin: 15px 0px -10px 0px;">
        <a class="company-link">{{ company }}</a>
    </h6>
    <table class="table table-bordered small">
        <thead>
            <tr>
                <td style="width: 33%">{{ __("Invoice Type") }}</td>
                <td style="width: 33%" class="text-right">{{ __("Total Invoices") }}</td>
                <td style="width: 33%" class="text-right">{{ __("Total Outstanding") }}</td>
            </tr>
        </thead>
        <tbody>
            {% if summary["Sales Invoice"] %}
            <tr>
                <td>
                    <a class="invoice-link" data-type="Sales Invoice" data-company="{{ company }}">
                        {{ __("Sales Invoice") }}
                    </a>
                </td>
                <td class="text-right">{{ summary["Sales Invoice"].total_invoices }}</td>
                <td class="text-right">
                    {{ format_currency(summary["Sales Invoice"].outstanding_amount, summary.currency, 2) }}
                </td>
            </tr>
            {% endif %}
        </tbody>
    </table>
    {% endfor %}
{% endif %}